function generateplayarea(width,height,boomNum){
    var createarea=[];
    var count=0;
    var bp=boompos(width,height,boomNum);
    for(var i=0;i<height;i++){
        createarea[i]=[];
        for(var j=0;j<width;j++){
            if(elementin(i,j,bp)) createarea[i][j]="b";
            else createarea[i][j]=0;
        }
    }
    for(var i=0;i<height;i++)
        for(var j=0;j<width;j++){
            count=0;
            if(createarea[i][j]==0){
                if(i-1>=0 && createarea[i-1][j]=="b") count++;
                if(i+1<=(height-1) && createarea[i+1][j]=="b") count++;
                if(j-1>=0 && createarea[i][j-1]=="b") count++;
                if(j+1<=(width-1) && createarea[i][j+1]=="b") count++;
                if(i-1>=0 && j-1>=0 && createarea[i-1][j-1]=="b") count++;
                if(i+1<=(height-1) && j-1>=0 && createarea[i+1][j-1]=="b") count++;
                if(i-1>=0 && j+1<=(width-1) && createarea[i-1][j+1]=="b") count++;
                if(i+1<=(height-1) && j+1<=(width-1) && createarea[i+1][j+1]=="b") count++;
                createarea[i][j]=count;
            }
        }
    return createarea;
}